import twisted.copyright
print twisted.copyright.disclaimer
from twisted.internet import reactor
from twisted.internet.protocol import Protocol ,Factory
import time

class Auth(Protocol):
    def connectionMade(self):
        print "%s || Connect From %s port %s " % (time.ctime(),self.transport.client[0],self.transport.client[1])
    def connectionLost(self,reason):
        print "%s || Disconnect From -->" % time.ctime(),self.transport.client

factory = Factory()
factory.protocol = Auth

reactor.listenTCP(30001,factory)
reactor.run()
